<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib uri="/tld/dictionary" prefix="dictionary"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>交易单详细</title>
<link rel="stylesheet" href="${ctx}/static/css/style.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/style1.css" type="text/css" /> 
<link rel="stylesheet" href="${ctx}/static/css/kongjian.css" type="text/css" />
<link rel="stylesheet" href="${ctx}/static/css/jquery.ui.all.css" />
<link rel="stylesheet" href="${ctx}/static/css/m.css" type="text/css" />
<script src="${ctx}/static/script/jquery-1.4.min.js" type="text/javascript"></script>
<script src="${ctx}/static/script/jquery.ui.core.js"></script>
<script src="${ctx}/static/script/jquery.ui.datepicker.js"></script>
</head>

<body style="margin:10px;">
<form:form id="mainForm" action="${ctx}/recommend/select_order_detail" modelAttribute="orderForm" method="post">
<input type="hidden" name="pageNo" id="pageNo" value="${page.pageNo}"/>
<input type="hidden" name="id" id="id" value="${orderForm.id}">
	<div>
		<p style=" text-align:left; height:30px; margin:0 20px; padding:0 10px; line-height:30px; border:#3b97e4 solid 1px;">
		交易单编号：${orderForm.id} 
		投资编号：${orderForm.investInfo.id}
		购买人客户编号：${orderForm.investInfo.customerInfo.customerCode}
		购买人客户姓名：${orderForm.investInfo.customerInfo.cnName}
		约定交割日期:
		<c:if test="${orderForm.investInfo.regularType=='00130001'}">
			<fmt:formatDate value="${orderForm.investInfo.investStartDate}"   pattern="yyyy-MM-dd" type="date" dateStyle="long" />
		</c:if>
		<c:if test="${orderForm.investInfo.regularType=='00130002'}">
			<fmt:formatDate value="${orderForm.investInfo.regularStartDate}"   pattern="yyyy-MM-dd" type="date" dateStyle="long" />
		</c:if>
		交易单金额：<fmt:formatNumber value="${orderForm.orderAmt}" pattern="##,###.##"/>
		</p>
    </div>
   <div class="shenqing2">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
	      <tr>
            <td width="61">债权编号：</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" id="loanId" name="loanId" class="ggkj_inputtext_80" value="${orderForm.loanId}" /></td>
            <td width="85">债权人：</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" id="creditor" name="creditor"  class="ggkj_inputtext_80" value="${orderForm.creditor}" />
            </td>
			<td width="85">债务人：</td>
            <td width="150px" style="color:#2E74D1;"><input type="text" id="debtor" name="debtor" class="ggkj_inputtext_80" value="${orderForm.debtor}" />
            </td>
			<td width="85"></td>
            <td width="150px" style="color:#2E74D1;">
			 <td width="93"><input name="Input" type="submit" class="chaxun_btn" value="&nbsp;&nbsp;查询" />
             </td>
          </tr>
      </table>
    </div>
	<div class="yiban">
	<table style="width:100%;" class="ggkj_table"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th scope="col">序号</th>
    <th scope="col">债权编号</th>
    <th scope="col">原债权人</th>
    <th scope="col">债务人</th>
    <th scope="col">债权价值</th>
    <th scope="col">推荐对价</th>
    <th scope="col">推荐比例</th>
    <th scope="col">实际交割日期</th>
    <th scope="col">irr</th>
  </tr>
  	<c:forEach items="${page.result}" var="item" varStatus="status">
		<c:choose>
  			<c:when test="${status.count%2==0}">
  				<tr class="ggkj_tdColr">
  			</c:when>
  			<c:otherwise>
  				<tr >
  			</c:otherwise>
		</c:choose>
		  <td>${status.count+(page.pageNo-1)*10}</td>
		  <td>${item.loanId}</td>
		  <td>${item.sellOrderDtl.ftTSellOrderMain.investInfo.customerInfo.cnName}</td>
		  <td>${item.loanInfo.customer.name}</td>
		  <td><fmt:formatNumber value="${item.loanInfo.loanAMt}" pattern="##,###.##"/></td>
		  <td><fmt:formatNumber value="${item.amt}" pattern="##,###.##"/></td>
		  <td>
		  <fmt:formatNumber value="${item.scale}" pattern="#0.####"></fmt:formatNumber>
		  </td>
		  <td><fmt:formatDate value="${item.ftOrderMain.deliveryDate}"   pattern="yyyy-MM-dd" type="date" dateStyle="long" /></td>
		  <td>${item.loanInfo.irr}</td>
		  </tr>
	</c:forEach>
</table>
</div>

<div class="ggkj_pagecontainer">
  <div class="ggkj_pageBGleft">
    	<span class="ggkj_pageBGright"></span>
    	<a href="javascript:jumpPage(1)" class="ggkj_pageUpa">
        
        </a>
        <a href="javascript:jumpPage(${page.prePage})" class="ggkj_pageUp">
        
        </a>
        <span class="ggkj_insertline"></span>
        <span class="ggkj_pageSpan">
        	页<input type="text" id="pageNo" name="pageNo" class="ggkj_inputtext_30" value="${page.pageNo}">OF ${page.totalPages}
        </span>
        <span class="ggkj_insertline"></span>
        <a href="javascript:jumpPage(${page.nextPage})" class="ggkj_pageDown">
        
        </a>
        <a href="javascript:jumpPage(${page.totalPages})" class="ggkj_pageDowna">
        
        </a>
    </div>
</div>
<script language="JavaScript">
	function jumpPage(pageNo) {
		document.getElementById('pageNo').value=pageNo;
		document.getElementById('mainForm').submit();
	}
</script>
<script language="JavaScript">


</script>
<script language="JavaScript">
	$(function() {
		$(".date-pick" ).datepicker({
	      dateFormat:'yy-mm-dd',
	      selectOtherMonths:true,
	      changeYear: true
  		});
	});
</script>
</body>
</form:form>

</body>
</html>
